//
//  SearchGoodsResponse.m
//  EasyToo
//
//  Created by zhengzhe on 13-10-13.
//
//

#import "SearchGoodsResponse.h"
#import "Goods.h"

@implementation SearchGoodsResponse

- (void)parse
{
    [super parse];
    
    if (self.bodyDict)
    {
        self.goodsArray = [[NSMutableArray alloc] init];
        
        NSArray *JsonArray = GetDictionaryArrayDefaultNil(self.bodyDict, @"goods");
        for (int i = 0; i < [JsonArray count]; i++)
        {
            NSDictionary *jsonDict = [JsonArray objectAtIndex:i];
            Goods *goods = [[Goods alloc] initWithDictionary:jsonDict];
            [self.goodsArray addObject:goods];
            
            [goods release];
        }
    }
}

@end
